
using System.Text;

using Mono.Collections.Generic;
using System.Diagnostics;

namespace Mono.Cecil
{


    [DebuggerDisplay("{Name}", Name = "Property Def Type resolved")]
    public class PropertyDefinitionRuntime : PropertyDefinition
    {

        private PropertyDefinition property;
        private PropertyDefinition item;
        private TypeReference _sealedType;

        public PropertyDefinitionRuntime(PropertyDefinition property, TypeReference Sealedtype)
        {
            this.property = property;
            this._sealedType = Sealedtype;
        }

        public override PropertyAttributes Attributes
        {
            get { return this.property.Attributes; }
            set { this.property.Attributes = value; }
        }

        public override bool HasThis
        {
            get { return this.property.HasThis; }
            set { this.property.HasThis = value; }
        }

        public override bool HasCustomAttributes { get { return this.property.HasCustomAttributes; } }

        public override Collection<CustomAttribute> CustomAttributes { get { return this.property.CustomAttributes; } }

        public override MethodDefinition GetMethod
        {
            get { return this.property.GetMethod; }
            set { this.property.GetMethod = value; }
        }

        public override MethodDefinition SetMethod
        {
            get { return this.property.SetMethod; }
            set { this.property.SetMethod = value; }
        }

        public override bool HasOtherMethods { get { return this.property.HasOtherMethods; } }

        public override Collection<MethodDefinition> OtherMethods { get { return this.property.OtherMethods; } }

        public override bool HasParameters { get { return this.property.HasParameters; } }

        public override Collection<ParameterDefinition> Parameters { get { return this.property.Parameters; } }



        public override bool HasConstant
        {
            get { return this.property.HasConstant; }
            set { this.property.HasConstant = value; }
        }

        public override object Constant
        {
            get { return this.property.Constant; }
            set { this.property.Constant = value; }
        }


        #region PropertyAttributes


        public override bool IsNotPublic { get { return this.property.IsPublic; } }
        public override bool IsPublic { get { return this.property.IsPublic; } }
        public override bool IsStatic { get { return this.property.IsStatic; } }
        public override bool IsFamilyAndAssembly { get { return this.property.IsFamilyAndAssembly; } }
        public override bool IsAssembly { get { return this.property.IsAssembly; } }
        public override bool IsFamily { get { return this.property.IsFamily; } }
        public override bool IsFamilyOrAssembly { get { return this.property.IsFamilyOrAssembly; } }

        public override bool CanWrite { get { return this.property.CanWrite; } }
        public override bool CanRead { get { return this.property.CanRead; } }

        public override bool CanWritePublic { get { return this.property.CanWritePublic; } }
        public override bool CanReadPublic { get { return this.property.CanReadPublic; } }


        public override bool IsSpecialName
        {
            get { return this.property.IsSpecialName; }
            set { this.property.IsSpecialName = value; }
        }

        public override bool IsRuntimeSpecialName
        {
            get { return this.property.IsRuntimeSpecialName; }
            set { this.property.IsRuntimeSpecialName = value; }
        }

        public override bool HasDefault
        {
            get { return this.property.HasDefault; }
            set { this.property.HasDefault = value; }
        }

        #endregion

        public override TypeDefinition DeclaringType
        {
            get { return this.property.DeclaringType; }
            set { this.property.DeclaringType = value; }
        }

        public override bool IsDefinition { get { return this.property.IsDefinition; } }

        public override PropertyDefinition Resolve() { return this; }
     

        public override TypeReference TypeMember
        {
            get { return this.property.Type(_sealedType); }
            set { this.property.TypeMember = value; }
        }

        public override TypeReference Type(TypeReference sealedType)
        {
            return this.property.Type(sealedType);
        }

        #region MemberReference

        public override string Name
        {
            get { return this.property.Name; }
            set { this.property.Name = value; }
        }

        public override string FullName { get { return this.property.FullName; } }

        public override MetadataToken MetadataToken
        {
            get { return this.property.MetadataToken; }
            set { this.property.MetadataToken = value; }
        }

        internal override bool HasImage { get { return this.property.HasImage; } }

        public override ModuleDefinition Module { get { return this.property.Module; } }

        internal override bool ContainsGenericParameter { get { return this.property.ContainsGenericParameter; } }

        internal override string MemberFullName() { return this.property.MemberFullName(); }

        public override string ToString() { return this.property.FullName; }

        #endregion

    }

}